from  rest_framework import serializers
from .models import User,Goods,Order



class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model=User
        fields="__all__"


class GoodsSerializer(serializers.ModelSerializer):
    class Meta:
        model = Goods
        fields = "__all__"

class OrderSerializer(serializers.ModelSerializer):
    class Meta:
        model=Order
        fields="__all__"

class ShowOrderSerializer(serializers.ModelSerializer):
    user=UserSerializer()
    goods=GoodsSerializer()
    class Meta:
            model=Order
            fields="__all__"
